package Presentacion;

import Clases.Feriado;
import Control.ControlFeriado;
import de.javasoft.plaf.synthetica.SyntheticaLookAndFeel;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.table.DefaultTableModel;

public class FeriadosCalendario extends javax.swing.JFrame {

    /**
     * Variables de la clase.
     */
    DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
    DateFormat diaDomingo = new SimpleDateFormat("EEE");
    private static FeriadosCalendario instancia = null;
    private ImageIcon iconoError;

    /**
     * Método que crea una sola instancia para esta clase.
     */
    public static FeriadosCalendario obtenerInstancia() {
        if (instancia == null) {
            instancia = new FeriadosCalendario();
        }
        return instancia;
    }

    /**
     * Constructor de la clase que inicializa todos sus elementos.
     */
    private FeriadosCalendario() {
        initComponents();
    }

    /**
     * Método que asigna un tooltip a cada icono de error
     */
    private void inicioTooltops() {
        iconoError = new ImageIcon(getClass().getResource("/Imagenes/warning.png"));
        jLabelDescripcion.setIcon(iconoError);
        jLabelDescripcion.setToolTipText("Debe escribir una descripción.");

        jLabelFecha.setIcon(iconoError);
        jLabelFecha.setToolTipText("Debe ingresar días feriados posteriores al día de hoy y no puede ser Domingo.");
        ocultarLabels();
    }

    /**
     * Método que se encarga de ocultar los labels que muestran los mensajes de
     * error
     */
    private void ocultarLabels() {
        jLabelDescripcion.setVisible(false);
        jLabelFecha.setVisible(false);
    }

    /**
     * Método que hace visible esta interfaz con sus respectivas propiedades.
     * Asigna también un Look And Feel a la interfaz. Carga la tabla de
     * feriados.
     */
    public void init() {
        setTitle("Calendario");
        setLocationRelativeTo(null);
        UIManager.removeAuxiliaryLookAndFeel(UIManager.getLookAndFeel());
        SwingUtilities.updateComponentTreeUI(this);
        try {
            UIManager.removeAuxiliaryLookAndFeel(UIManager.getLookAndFeel());
            SyntheticaLookAndFeel.setWindowsDecorated(false);
            UIManager.setLookAndFeel("de.javasoft.plaf.synthetica.SyntheticaAluOxideLookAndFeel");
            SwingUtilities.updateComponentTreeUI(this);

        } catch (Exception ex) {
            try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        llenarTablaFeriados();
        jTable1.getColumnModel().getColumn(0).setWidth(jTable1.getColumnModel().getColumn(0).getMinWidth() + 10);
        jTable1.getColumnModel().getColumn(0).setMaxWidth(jTable1.getColumnModel().getColumn(0).getMinWidth() + 10);
        inicioTooltops();

        this.limpiar();
        this.setVisible(true);
    }

    /**
     * Método que llena una tabla con los feriados del año.
     */
    public void llenarTablaFeriados() {
        ArrayList<Feriado> feriados = ControlFeriado.obtenerInstancia().obtenerListaFeriados();
        DefaultTableModel m = (DefaultTableModel) jTable1.getModel();
        try {
            while (m.getRowCount() > 0) {
                m.removeRow(0);
            }
            for (int i = 0; i < feriados.size(); i++) {
                m.insertRow(m.getRowCount(), new Object[]{false, feriados.get(i).getFecha(),
                    feriados.get(i).getDescripcion(),});
            }
        } catch (Exception e) {
            System.out.println(e.getCause());
        }
    }

    /**
     * Método que obtiene los feriados seleccionados de la tabla.
     */
    public ArrayList<Feriado> getFeriadosSeleccionados() {
        ArrayList<Feriado> feriados = new ArrayList<Feriado>();
        for (int i = 0; i < jTable1.getRowCount(); i++) {
            if ((Boolean) jTable1.getValueAt(i, 0).equals(Boolean.TRUE)) {
                feriados.add(new Feriado((Date) jTable1.getValueAt(i, 1), (String) jTable1.getValueAt(i, 2)));
            }
        }
        return feriados;
    }

    void crear(){
     if (validarFeriado()) {
            try {
                Date dia = jCalendar1.getDate();
                String descripcion = textFieldDescripcion.getText();
                Feriado feriado = new Feriado(dia, descripcion);
                boolean resultado = ControlFeriado.obtenerInstancia().insertarFeriado(feriado);
                if (!resultado) {
                    JOptionPane.showMessageDialog(null, "Error al agregar el día feriado, puede que ya exista", "Mensaje", JOptionPane.ERROR_MESSAGE);
                } else {
                    JOptionPane.showMessageDialog(null, "Día feriado ingresado exitosamente", "Mensaje", JOptionPane.INFORMATION_MESSAGE);
                    llenarTablaFeriados();
                    this.limpiar();
                }
            } catch (Exception e) {
                JOptionPane.showMessageDialog(null, "Error al agregar el día feriado, intentelo de nuevo", "Mensaje", JOptionPane.ERROR_MESSAGE);
            }
        }
    }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jButton2 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jCalendar1 = new com.toedter.calendar.JCalendar();
        textFieldFeriado = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        textFieldDescripcion = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jLabelDescripcion = new javax.swing.JLabel();
        jLabelFecha = new javax.swing.JLabel();
        jButton10 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(390, 410));

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "", "Fecha", "Descripcion"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Boolean.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                true, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        jButton2.setText("Eliminar");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton9.setText("Salir");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButton2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton9)))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 320, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton2)
                    .addComponent(jButton9))
                .addGap(7, 7, 7))
        );

        jTabbedPane1.addTab("Consultar Feriados", jPanel3);

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jCalendar1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jCalendar1MouseClicked(evt);
            }
        });
        jCalendar1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jCalendar1PropertyChange(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jCalendar1, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jCalendar1, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
                .addContainerGap())
        );

        textFieldFeriado.setEditable(false);
        textFieldFeriado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textFieldFeriadoActionPerformed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel1.setText("Fecha:");

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel2.setText("Descripción:");

        textFieldDescripcion.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                textFieldDescripcionKeyPressed(evt);
            }
        });

        jButton1.setText("Crear día feriado");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabelDescripcion.setText("x");
        jLabelDescripcion.setMaximumSize(new java.awt.Dimension(24, 24));
        jLabelDescripcion.setMinimumSize(new java.awt.Dimension(22, 22));
        jLabelDescripcion.setPreferredSize(new java.awt.Dimension(22, 22));

        jLabelFecha.setText("x");
        jLabelFecha.setMaximumSize(new java.awt.Dimension(24, 24));
        jLabelFecha.setMinimumSize(new java.awt.Dimension(22, 22));
        jLabelFecha.setPreferredSize(new java.awt.Dimension(22, 22));

        jButton10.setText("Salir");
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addComponent(jButton1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jButton10))
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel2)
                                .addComponent(jLabel1))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addComponent(textFieldFeriado, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabelFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addComponent(textFieldDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabelDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap(34, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(textFieldFeriado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(textFieldDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1)
                    .addComponent(jButton10))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Ingresar Feriados", jPanel2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void textFieldFeriadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textFieldFeriadoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textFieldFeriadoActionPerformed

    private void jCalendar1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jCalendar1MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_jCalendar1MouseClicked

    /**
     * Método que le da formato al calendario.
     */
    private void jCalendar1PropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jCalendar1PropertyChange
        Date dia = jCalendar1.getDate();
        textFieldFeriado.setText(df.format(dia));
    }//GEN-LAST:event_jCalendar1PropertyChange

    /**
     * Método que permite agregar dias feriados.
     */
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
       this.crear();
    }//GEN-LAST:event_jButton1ActionPerformed

    /**
     * Método que elimana feriados seleccionados.
     */
    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        ControlFeriado controlF = ControlFeriado.obtenerInstancia();
        ArrayList<Feriado> seleccionados = this.getFeriadosSeleccionados();
        ArrayList<Feriado> errores = new ArrayList<Feriado>();
        if (seleccionados.size() > 0) {
            int confirmado = JOptionPane.showConfirmDialog(null, "¿Está seguro que quiere eliminar el/los feriados seleccionados?");
            if (JOptionPane.OK_OPTION == confirmado) {
                for (int i = 0; i < seleccionados.size(); i++) {
                    if (!controlF.eliminarFeriado(seleccionados.get(i))) {
                        errores.add(seleccionados.get(i));
                    }
                }
                if (errores.isEmpty()) {
                    JOptionPane.showMessageDialog(null, "Eliminación exitosa", "Mensaje", JOptionPane.INFORMATION_MESSAGE);
                } else {
                    String s = "No se completo la asignación para: ";
                    int i = 0;
                    for (i = 0; i < errores.size() - 1; i++) {
                        s += errores.get(i).toString() + ",";
                    }
                    s += errores.get(i);
                    JOptionPane.showMessageDialog(null, s, "Mensaje", JOptionPane.ERROR_MESSAGE);
                }

            }
            this.llenarTablaFeriados();
        } else {
            JOptionPane.showMessageDialog(null, "No se seleccionó ningún día feriado para eliminar.", "Mensaje", JOptionPane.ERROR_MESSAGE);
        }

    }//GEN-LAST:event_jButton2ActionPerformed

    private void textFieldDescripcionKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_textFieldDescripcionKeyPressed
         int key = evt.getKeyCode();
        if (key == evt.VK_ENTER) {
            this.crear();
        }
    }//GEN-LAST:event_textFieldDescripcionKeyPressed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
        dispose();
    }//GEN-LAST:event_jButton9ActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
        dispose();
    }//GEN-LAST:event_jButton10ActionPerformed
    /**
     * Método que valida que la información que se digito para ingresar el
     * feriado sea correcta.
     */
    private boolean validarFeriado() {
        ocultarLabels();
        Date dia = jCalendar1.getDate();
        Date fechaHoy = new Date();
        boolean itsOk = true;
        if ("sunday".contains(diaDomingo.format(dia)) || "domingo".contains(diaDomingo.format(dia)) || dia == null || (!fechaHoy.before(dia))) {
            itsOk = false;
            jLabelFecha.setVisible(true);
        }
        String descripcion = textFieldDescripcion.getText();
        if (descripcion.isEmpty()) {
            itsOk = false;
            jLabelDescripcion.setVisible(true);
        }
        return itsOk;
    }

    /**
     * Método que limpia los elementos de la interfaz.
     */
    public void limpiar() {
        textFieldFeriado.setText("");
        jCalendar1.setDate(new Date());
        textFieldDescripcion.setText("");
        this.ocultarLabels();
    }

    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FeriadosCalendario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FeriadosCalendario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FeriadosCalendario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FeriadosCalendario.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        /* Create and display the form */

        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FeriadosCalendario().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton9;
    private com.toedter.calendar.JCalendar jCalendar1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabelDescripcion;
    private javax.swing.JLabel jLabelFecha;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField textFieldDescripcion;
    private javax.swing.JTextField textFieldFeriado;
    // End of variables declaration//GEN-END:variables
}
